// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package com.geniusai.aip.auth.exception;

import com.geniusai.aip.feature.common.web.exceptions.rest.RestFeatureBaseException;
import lombok.Data;
import org.springframework.http.HttpStatus;

/**
 * @author hml14563
 * @date 2021/3/19
 */
@Data
public class AuthLoginException extends RestFeatureBaseException {

    private HttpStatus httpStatus;

    public AuthLoginException(String errorCode, String errorMsg, Throwable throwable) {
        super(errorCode, errorMsg, throwable);
    }

    public AuthLoginException(AuthLoginExceptionEnum errorInfo) {
        super(errorInfo);
        this.httpStatus = errorInfo.getResponseStatus();
    }

    public AuthLoginException(AuthLoginExceptionEnum errorInfo, String errorMsg) {
        super(errorInfo, errorMsg);
        this.httpStatus = errorInfo.getResponseStatus();
    }

    public AuthLoginException(AuthLoginExceptionEnum errorInfo, String... errorMsg) {
        super(errorInfo, errorMsg);
        this.httpStatus = errorInfo.getResponseStatus();
    }

    public AuthLoginException(AuthLoginExceptionEnum errorInfo, Throwable throwable) {
        super(errorInfo, throwable);
        this.httpStatus = errorInfo.getResponseStatus();
    }

}
